|
ontology
Concepts:
Predicates
Actions
Propositions
The employment subdirectory contains one
class for each ontological role plus the static class EmploymentOntology
that creates an ontology
The employment-ontology is used by two
agents:
The RequesterAgent, before requesting the
engagement of a person, queries the EngagerAgent whether that person is
already working for the company whose employees are managed by the EngagerAgent.
Some hints about the code are in the followings.
In the agent setup, besides the addition
of the main behaviour, the name of the EngagerAgent and the detail of the
company where to engage people are requested to the user.
The EngagerAgent has two behaviours:
This examples shows how to use the support
for application specific ontologie provided by JADE.
.
A very simple ontology (the employment-ontology)including
concepts related to the employment of people into companies is defined
in the package
examples.ontology.employment. The roles
in this ontology are
PERSON
COMPANY
ADDRESS
WORKS-FOR - meaning that a person
is working for a company
ENGAGE - meaning that a person is
being engaged by a company
ENGAGEMENT-ERROR - meaning that
an error occurred in performing the engage action
PERSON-TOO-OLD - meaning that a
person cannot be engaged by a company because he is too old.
object and adds to it all the roles described
above.
- The RequesterAgent that gets the details
of people to engage from the user and asks the EngagerAgent to actually
engage them.
- The EngagerAgent that actually perform
the engagement.
The RequesterAgent has a single cyclic
complex behaviour in which
- The details of a person to engage are
got from the user. This is done in the preAction() method.
- A query is sent to the EngagerAgent
to check that the indicated person is not already working for the indicated
company. This is done by following
the FIPA-Query protocol and it is implemented
through a FipaQueryInitiatorBehaviour that is added as a sub-behaviour
of the main agent behaviour.
- According to the result of the query,
A request is sent to the
EngagerAgent to actually perform the engagement.
This is done following the FIPA-Request protocol and is implemented through
FipaRequestInitiatorBehaviour that is added as a sub-behaviour.
- In the postAction() method the main
agent behaviour is reset so that it is performed cyclically
- A FipaQueryResponderBehaviour to handle
queries about people working for a company following a FIPA-Query protocol.
- A FipaRequestResponderBehaviour to handle
engagement requests following a FIPA-Request protocol.
Both behaviours are cyclic.
The company whose engagement are handled
by the EngagerAgent is fixed:
CSELT
Via Reiss Romoli 274
Turin
JADE is a trademark of CSELT. JADE has been developed jointly by CSELT and the Computer Engineering Group of the University of Parma